xl: refactor common parts of command line parsing
authorAndre Przywara <andre.przywara@amd.com>
Wed, 4 May 2011 13:46:32 +0000 (14:46 +0100)
committerAndre Przywara <andre.przywara@amd.com>
Wed, 4 May 2011 13:46:32 +0000 (14:46 +0100)
commit328dadc3d5d948ad78b7b4edc79fcb6ae785a4f2
tree22a8e32cfd72b72052f27aa4892228d5c7c9c266
parent0f2dae90062ead5ae7ecd483ba3bd3ccb6686fe1
xl: refactor common parts of command line parsing

xl command options are currently handled in each command's sub function,
leading to a lot of duplicate code.

This patch moves the common part of it into a separate function,
which handles the help switch, unknown options and an insufficient
number of parameters. This removes a lot of redundant code.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c